﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_DeletePhoto')
BEGIN
    PRINT 'Dropping Procedure proc_cm_DeletePhoto'
    DROP  Procedure  proc_cm_DeletePhoto
END
GO

PRINT 'Creating Procedure proc_cm_DeletePhoto'
GO

CREATE Procedure dbo.proc_cm_DeletePhoto  
 @pPhotoId uniqueidentifier  
AS  
BEGIN  
    -- SET NOCOUNT ON added to prevent extra result sets from  
    -- interfering with SELECT statements.  
    SET NOCOUNT ON;  
  
 delete from tbl_photo  
 where photo_id = @pPhotoId  
END  
GO

GRANT EXEC ON dbo.proc_cm_DeletePhoto TO PUBLIC
GO
